fix: Fix validate command: unify CLI/TUI logic, add missing schema checks, improve TUI screen (#12)#13
Open
aidandaly24 wants to merge 1 commit intomainfrom
Open
fix: Fix validate command: unify CLI/TUI logic, add missing schema checks, improve TUI screen (#12)#13aidandaly24 wants to merge 1 commit intomainfrom
aidandaly24 wants to merge 1 commit intomainfrom
Conversation
Owner
Author
CI Status AnalysisThe CI failures on this PR are pre-existing on Build failures (20.x, 22.x, 24.x)The
This branch adds 25 more passing tests (20 new validate tests + 5 existing tests now counted) with zero new failures. Security failureThe Passing checks (our changes)
|
Coverage Report
|
…ecks, improve TUI screen (#12)
f37b055 to
2b3859c
Compare
Package Tarballaws-agentcore-0.3.0-preview.6.1.tgz How to installnpm install https://github.com/aidandaly24/agentcore-cli/releases/download/pr-13-tarball/aws-agentcore-0.3.0-preview.6.1.tgz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #12 — The
agentcore validatecommand had divergent behavior between CLI and TUI modes, missing schema validations, and duplicated business logic.Changes
src/cli/commands/validate/action.tsmcp.jsonandmcp-defs.jsonvalidation — CLI now validates all 5 config files (matching TUI behavior)ValidateFileResulttype with per-file{ file, success, skipped?, error? }— enables both CLI and TUI to show granular statusValidateResultto include aresults: ValidateFileResult[]array alongside the existingsuccess/errorfieldsmcp.json,mcp-defs.json,.cli/state.json) are gracefully skipped when absentsrc/cli/commands/validate/command.tsxsrc/cli/tui/screens/validate/ValidateScreen.tsxhandleValidate()fromaction.tsinstead of reimplementing validation logic independentlyValidateFileResult[]toStep[]for theStepProgressUI componentsteps={[]})src/cli/commands/validate/index.tsValidateFileResulttypesrc/cli/commands/index.tsregisterValidatere-export (consistent with all other commands)src/cli/commands/validate/__tests__/action.test.tsmcp.jsonvalidation when presentmcp.jsonskipped when absentmcp.jsonerror handlingmcp-defs.jsonvalidation when presentmcp-defs.jsonskipped when absentmcp-defs.jsonerror handlingresultsarray in return typeAcceptance Criteria
agentcore validatevalidates all 5 config files (agentcore.json, aws-targets.json, mcp.json, mcp-defs.json, .cli/state.json)handleValidate()— no duplicated validation logicregisterValidateis re-exported fromsrc/cli/commands/index.ts